#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1100;
char s[1100][10];
int main()
{
	int n;
	int flag = 0;
	cin>>n;
	int x = -1,y = -1;
	for(int i = 1;i<=n;i++)
	{
		for(int j = 1;j<=5;j++)
		{
			cin>>s[i][j];
		}
	}
//	int flag = 0;
	for(int i = 1;i<=n;i++)
	{
		for(int j = 1;j<=5;j++)
		{
			if(j!=1&&s[i][j]==s[i][j-1]&&s[i][j]=='O')
			{
				
				x = i;
				y = j;
				flag = 1;
				break;
			}
		}
		if(flag) break;
	}
	if(x==y&&x==-1) puts("NO");
	else
	{
		puts("YES");
		for(int i = 1;i<=n;i++)
		{
			for(int j = 1;j<=5;j++)
			{
				if(i==x&&j==y-1||i==x&&j==y) printf("+");
				else printf("%c",s[i][j]);
			}
			printf("\n");
		}
	}
}
